package main

import (
	_"hw_admin/routers"
	_ "hw_admin/sysconf"
	"github.com/astaxie/beego"
	"net/http"
	"html/template"
)

func main() {

	//beego.InsertFilter("/*",beego.FinishRouter,UrlManager)
	//404
	beego.ErrorHandler("404",page_not_found)
	beego.Run()
}


func page_not_found(rw http.ResponseWriter, r *http.Request){
	t,_:= template.New("404.html").ParseFiles(beego.BConfig.WebConfig.ViewsPath+"/404.html")
	data :=make(map[string]interface{})
	data["content"] = "page not found"
	t.Execute(rw, data)
}